package com.wkbb.basic.thread;

import com.wkbb.basic.feign.CommunityFeignService;
import lombok.extern.slf4j.Slf4j;

/**
 * @author yangdaofang
 * 创建时间：2020-08-06 16:18
 */
@Slf4j
public class CommunityChangeVideoTask implements Runnable {

    private CommunityFeignService communityFeignService;

    private Long orgId;

    private Long userId;

    public CommunityChangeVideoTask(CommunityFeignService communityFeignService, Long orgId, Long userId ) {
        this.communityFeignService = communityFeignService;
        this.orgId = orgId;
        this.userId = userId;
    }

    public CommunityChangeVideoTask() {

    }

    @Override
    public void run() {
        log.info("*******CommunityChangeVideoTask**********communityFeignService:{},orgId{},userId{}", communityFeignService, orgId, userId);
        try {
            communityFeignService.updateVideoListByOrgIdAndClassId(orgId, userId);
        } catch (Exception e) {
            log.error("*******CommunityChangeVideoTask异常**********",e);
        }
    }
}
